package features;

import java.awt.Toolkit;

import javax.swing.undo.CannotRedoException;
import javax.swing.undo.CannotUndoException;
import javax.swing.undo.UndoManager;

public class Redo_Undo {

 public void undo(UndoManager undo) {

  try {
   undo.undo();
  } catch (CannotUndoException ex) {
   System.out.println("Unable to undo: " + ex);
   Toolkit.getDefaultToolkit().beep();
  }

 }

 public void redo(UndoManager undo) {

  try {
   undo.redo();
  } catch (CannotRedoException ex) {
   System.out.println("Unable to redo: " + ex);
   Toolkit.getDefaultToolkit().beep();
  }

 }
}
